# import os
# print(os.getcwd())
# os.mkdir('os_test')
# os.chdir('os_test')
# os.mkdir('mk_test')
# f = open('1.txt','w')
# f.close()
# os.rename('1.txt','2.txt')
# os.chdir('D:\孙航')
# print(os.listdir('os_test'))
# os.rmdir('os_test\\mk_test')
# print(os.listdir('os_test'))
# os.remove('os_test\\2.txt')
# print(os.listdir('os_test'))


import os
os.mkdir('语文')
os.chdir('语文')
# data_list = ['语法','诗词','古文','写作','外国文学']
# for data in data_list:
#     filename = data + '.txt'
#     file= open(filename, 'w')
#     file.close()
# path = os.getcwd()
# print(os.listdir(path))
# os.remove('外国文学.txt')
# os.mkdir('外国文学')
# file_name = os.listdir(path)
# print(file_name)
# i = 1
# for name in file_name:
#     if '.txt' in name:
#         new_name = str(i) + name
#         os.rename(name, new_name)
#         i += 1
#     print(os.listdir(path))